function [tw, image_samp_intvl, st] = image_times()

tw = [];
st = [];
image_samp_intvl = 1;
dfile=datac('getdfile');
[w, tx] = datac('getw');
if(isempty(w))
   return;
end;

k1=zeros(1, length(w)); % initialize pulse vector
[d1, k2] = find(w>2.5); % find points > threshold
k1(k2) = 1; % create pulse vectore array 
k1 = diff(k1); % find transitions by differentiating
samp_pos=find(k1 < 0); % and reduce to list of spike latencies - referenced from falling signal time
%samp_pos = [1 samp_pos];
tw = tx(samp_pos); % samp_pos*dfile.rate*dfile.nr_channel;
%tw(1) = 0;
image_samp_intvl = mean(diff(tw));

return;
